﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace MachiningHelper.ToolFile
{
    public class SawSeq
    {
        public string SawStartX { get; set; }
        public string SawStartY { get; set; }
        public string SawStartZ { get; set; }
        public string SawEndX { get; set; }
        public string SawEndY { get; set; }
        public string SawEndZ { get; set; }
        public string SawKerfWidth { get; set; }
        public string SawToolName { get; set; }
        public string SawPreviousToolName { get; set; }
        public string SawNextToolName { get; set; }
        public string SawFeedSpeed { get; set; }
        public string SawToolComp { get; set; }
        public string SawStartOffsetX { get; set; }
        public string SawStartOffsetY { get; set; }
        public string SawEndOffsetX { get; set; }
        public string SawEndOffsetY { get; set; }
        public static SawSeq LoadSeq(string Line)
        {
            SawSeq ss = new SawSeq();
            var pars = Line.Split(',');
            ss.SawStartX = pars[1];
            ss.SawStartY = pars[2];
            ss.SawStartZ = pars[3];
            ss.SawEndX = pars[4];
            ss.SawEndY = pars[5];
            ss.SawEndZ = pars[6];
            ss.SawKerfWidth = pars[7];
            ss.SawToolName = pars[8];
            ss.SawPreviousToolName = pars[9];
            ss.SawNextToolName = pars[10];
            ss.SawFeedSpeed = pars[11];
            ss.SawToolComp = pars[12];
            ss.SawStartOffsetX = pars[13];
            ss.SawStartOffsetY = pars[14];
            ss.SawEndOffsetX = pars[15];
            ss.SawEndOffsetY = pars[16];
            return ss;
        }
    }
}
